Skip to content

ui: 修复按钮变体使用不一致并统一图标按钮交互#192

Merged
ThaddeusJiang merged 2 commits into
mainfrom
fix/button-variant-and-icon-button-consistency
May 10, 2026
Merged

ui: 修复按钮变体使用不一致并统一图标按钮交互#192
ThaddeusJiang merged 2 commits into
mainfrom
fix/button-variant-and-icon-button-consistency

Conversation

@ThaddeusJiang

Copy link
Copy Markdown
Owner

变更目标

修复图片详情页图标按钮在 light mode 下风格不一致、hover 反馈不统一的问题,并统一 <.button> 的变体/尺寸使用方式,避免语义与 daisyUI 样式混用。

主要改动

  • 修复图片详情页图标按钮:
    • 调整展开按钮为普通默认按钮(不再使用 ghost),保留统一尺寸与定位。
    • 将 caption 生成按钮从原生 <button class="btn ..."> 改为 <.button variant="ghost" size="sm">,class 仅保留结构/定位类。
  • 清理全局样式覆盖:
    • 移除 assets/css/app.css 中对 .btn-ghost 的自定义覆盖,恢复 daisyUI 默认 ghost 行为。
  • 统一组件约定:
    • VmemoWeb.CoreComponents.button/1variant 默认值改为 nil,允许“普通默认按钮”写法。
    • 修复局部 <.button> 误用:把 btn-sm 改为 size="sm",移除 <.button class> 中重复 btn 基类。
  • 文档与变更记录:
    • 更新 docs/guides/coding/uiux.md,明确 variant 负责语义,daisyUI class 负责布局/定位等视觉细节。
    • 更新 CHANGELOG.mdUnreleased

验证

  • mix compile
  • mix test

风险与说明

  • 本次仅涉及按钮样式与组件调用规范,不涉及业务逻辑与数据结构。
  • 保留 btn-circle/btn-square 等结构类用法,仅清理语义冲突类(如 btn-smsize 混用)。

@ThaddeusJiang ThaddeusJiang changed the title 修复按钮变体使用不一致并统一图标按钮交互 ui: 修复按钮变体使用不一致并统一图标按钮交互 May 10, 2026
@ThaddeusJiang ThaddeusJiang self-assigned this May 10, 2026
@codecov

codecov Bot commented May 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.10%. Comparing base (c2f4798) to head (7a817bc).
⚠️ Report is 25 commits behind head on main.

Files with missing lines Patch % Lines
lib/vmemo_web/live/image_id_live.ex 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #192      +/-   ##
==========================================
+ Coverage   36.18%   38.10%   +1.92%     
==========================================
  Files         119      121       +2     
  Lines        5441     5647     +206     
==========================================
+ Hits         1969     2152     +183     
- Misses       3472     3495      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ThaddeusJiang ThaddeusJiang merged commit 7ac7b57 into main May 10, 2026
7 of 8 checks passed
@ThaddeusJiang ThaddeusJiang deleted the fix/button-variant-and-icon-button-consistency branch May 10, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant